package mapper;

import org.apache.ibatis.annotations.Param;
import entity.SysUser;

import java.util.List;

public interface SysUserMapper {
    public List<SysUser> getUserList(SysUser user);
    public int insert(SysUser sysUser);
    public int update(SysUser sysUser);
    public int delete(Integer id);
    /**
     * 分页查询用户信息
     */
    public List<SysUser> getPage(@Param("sysUser") SysUser sysUser,
                                 @Param("pageBegin") Integer pageBegin,
                                 @Param("pageSize") Integer pageSize);
    /**
     * 根据条件查询总数据量`
     */
    public Integer count(@Param("sysUser") SysUser sysUser);

    /**
     * 根据用户名查询用户信息
     * @param account
     * @return
     */
    public SysUser getByAccount(@Param("account") String account);
    /**
     * 通过id获取user
     * @param id
     * @return
     */
    public SysUser getById(@Param("id") Long id);

    public SysUser getByPassword(@Param("password") String password);

}
